<?php

namespace common\wosotech\base;

use Yii;
use yii\base\InlineAction;
use yii\helpers\Url;

class Controller extends \yii\web\Controller
{

    public function actionAjaxBroker($args)
    {
        $args = json_decode($args, true);
        yii::error(print_r($args, true));

/*
        if (!in_array($args['funcname'], ['bindMobileAjax', 'modifyNameAjax', 'modifyCompanyAjax', 'modifyEmailAjax', 'modifyIndustryAjax', 'modifyAreaAjax',
            'modifyQqAjax', 'modifyMobileAjax', 'modifyWeixinAjax', 'modifyDutyAjax', 'modifySexAjax', 'toggleAjax', 'updateAttributeAjax'
        ])) 
        {        
            $me = $this->getMe();
            if (empty($me->mobile)) 
            {
                $this->redirect(['wap/bindphone']);
            }

            if (empty($me->name) || empty($me->company) || empty($me->duty) || empty($me->industry_id) || empty($me->area_id)) 
            {
                $this->redirect(['wap/bind-corp']);
            }            
        }        
*/        
        //return call_user_func_array(array($args['classname'], $args['funcname']), $args['params']);
        return call_user_func(array($args['classname'], $args['funcname']), $args['params']);
    }

}
